import { apiClient } from 'axiom-view';

const strategyApi = {
  /**
   * 获取所有可用的分块策略
   * @returns {Promise<ApiResponse_List_StrategyInfoVO__>}
   */
  getAvailableStrategies() {
    return apiClient.get('/knowledge-strategies');
  },

  /**
   * 根据文档ID列表获取智能推荐的索引策略
   * @param {string[]} documentIds - 要批量解析的文档记录ID列表。
   * @returns {Promise<ApiResponse<StrategySuggestionVO>>}
   */
  getStrategySuggestion(documentIds) {
    return apiClient.post('/knowledge-strategies/suggest', { document_ids: documentIds });
  },

  /**
   * 获取指定策略的默认配置
   * @param {string} strategyName - The name of the strategy.
   * @returns {Promise<ApiResponse_DocumentIndexDTO_>}
   */
  getStrategyDefaultConfig(strategyName) {
    return apiClient.get(`/knowledge-strategies/${strategyName}/default-config`);
  },
};

export { strategyApi }; 